/*
 * TophemanUtils
 *
 * @author Christophe Rosset <tophe@topheman.com>
 * http://blog.topheman.com/
 */

var TophemanUtils = {

    formatTime : function(milliseconds){
        var x;
        x = milliseconds / 1000;
        var seconds = (Math.floor((x % 60)*100)/100).toFixed(2);
        if(seconds<10) seconds = '0'+seconds.toString();
        x /= 60;
        var minutes = Math.floor(x % 60);
        if(minutes<10) minutes = '0'+minutes.toString();
        x /= 60;
        var hours = Math.floor(x % 24);
        if(hours<10) hours = '0'+hours.toString();
        return hours.toString()+':'+minutes.toString()+':'+seconds.toString();
    }

}